import 'app_options/app_theme_data.dart';
import 'package:flutter/material.dart';

import 'pages/capsule_home_page.dart';
import 'utils/global_variables.dart';

void main() async {
  await appConfig.readFromFile();

  runApp(const CapsuleApp());
}

class CapsuleApp extends StatelessWidget {
  const CapsuleApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Capsule',
      theme: ThemeData(
          textTheme: AppThemeData.globalTextTheme,
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
          useMaterial3: true,
          inputDecorationTheme: const InputDecorationTheme(
              isDense: true, border: InputBorder.none, filled: true)),
      home: const CapsuleHomePage(title: 'Capsule'),
    );
  }
}
